package tfmcbs.diagram.edit.policies;

import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;

import tfmcbs.diagram.edit.commands.Artifact2CreateCommand;
import tfmcbs.diagram.edit.commands.CompositeComponent2CreateCommand;
import tfmcbs.diagram.edit.commands.Interface2CreateCommand;
import tfmcbs.diagram.edit.commands.PrimitiveComponent2CreateCommand;
import tfmcbs.diagram.providers.ComponentBasedSystemElementTypes;

/**
 * @generated
 */
public class CompositeComponentCompositeComponentCompartmentItemSemanticEditPolicy
		extends ComponentBasedSystemBaseItemSemanticEditPolicy {

	/**
	 * @generated
	 */
	public CompositeComponentCompositeComponentCompartmentItemSemanticEditPolicy() {
		super(ComponentBasedSystemElementTypes.CompositeComponent_2023);
	}

	/**
	 * @generated
	 */
	protected Command getCreateCommand(CreateElementRequest req) {
		if (ComponentBasedSystemElementTypes.PrimitiveComponent_3019 == req
				.getElementType()) {
			return getGEFWrapper(new PrimitiveComponent2CreateCommand(req));
		}
		if (ComponentBasedSystemElementTypes.CompositeComponent_3020 == req
				.getElementType()) {
			return getGEFWrapper(new CompositeComponent2CreateCommand(req));
		}
		if (ComponentBasedSystemElementTypes.Interface_3021 == req
				.getElementType()) {
			return getGEFWrapper(new Interface2CreateCommand(req));
		}
		if (ComponentBasedSystemElementTypes.Artifact_3022 == req
				.getElementType()) {
			return getGEFWrapper(new Artifact2CreateCommand(req));
		}
		return super.getCreateCommand(req);
	}

}
